<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>  

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>

<%@ page isELIgnored="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>活动页</title>
		
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<link href="css/public_ac.css" rel="stylesheet" type="text/css" />
		<link href="css/column_ac.css" rel="stylesheet" type="text/css" />
		<link href="css/activity.css" rel="stylesheet" type="text/css" />
		<script src="dwr/interface/ActivityTypeService.js"></script>
		<script src="dwr/engine.js"></script> 
		<script src="dwr/util.js"></script>
		
		<script type="text/javascript">
		function getAllBigType(){
			ActivityTypeService.findAllBigType(addOption);
		}
		
		function addOption(data){
			DWRUtil.removeAllOptions("select");
			
			DWRUtil.addOptions("select", data, "bigtypeId", "bigtypeName");
		}
	
		function getSmallType(){
			ActivityTypeService.findByBigType(DWRUtil.getValue("bigType"),addSmallyType);
		}
	
		function addSmallyType(data) {
			
			DWRUtil.removeAllOptions("smallType");
			DWRUtil.addOptions("smallType", data, "smalltypeId", "smalltypeName");
		}
		</script>

	</head>
	<body class="body">
		<div class="pageContent">
		
			<jsp:include flush="true" page="../activity/header.jsp"></jsp:include>
			
			<!-- 页面主内容 -->
			<div class="main">
			
				<!-- 页面左侧内容 -->
				<div class="mainLeft">
					
					<!-- 左侧栏目1 -->
					<div class="columnType1">
						<div class="columnType1Title">
							<div class="columnType1TitlePic">
								<img src="theme/skin1/public/columnPic/01.gif"/>
							</div>
							<div class="columnType1TitleText">
								我的活动
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType1Content" style="background:#000;_height:1%">
							<div id="at">
							<ul>
				        	  <li><a href="myActivity.do?method=IPost">我发起的活动</a></li>
				        	  <li><a href="myActivity.do?method=IJoin">我加入的活动</a></li>
				   	    	  <li><a href="activity.do?method=post">发起新活动</a></li>
				   	    	</ul>
   	    					</div>
						</div>
					</div>
					
					<!-- 左侧栏目1 -->
					<div class="columnType1" style="margin-top:5px;">
						<div class="columnType1Title">
							<div class="columnType1TitlePic">
								<img src="theme/skin1/public/columnPic/01.gif"/>
							</div>
							<div class="columnType1TitleText">
								活动分类
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType1Content" style="background:#000;">
							<div id="at">
							<ul>
				        	  <c:forEach items="${requestScope.list}" var="data">
				        	  <li><a href="getActivityByType.do?method=big&big=${data.bigtypeId}"><c:out value="${data.bigtypeName}"></c:out></a>
				       	      	<ul>
				       	      	<c:forEach items="${data.activitySmalltypes}" var="small">
				       	      	<li><a href="getActivityByType.do?method=small&small=${small.smalltypeId}"><c:out value="${small.smalltypeName}"></c:out></a></li>
				       	      	</c:forEach>
				                </ul>
				              </li>
				              </c:forEach>
				   	    	</ul>
   	    					</div>
						</div>
					</div>
					
				</div>
				
				<!-- 页面中间内容 -->
				<div class="mainContent">
					
					<!--  中间栏目1 -->
					<div class="columnType2">
						<div class="columnType2Title">
							<div class="columnType2TitlePic">
								<img src="theme/skin1/public/columnPic/04.gif"/>
							</div>
							<div class="columnType2TitleText">
								创建新活动
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType2Content">
							<html:form action="/activity.do?method=post" >
					            <div id="at4">
					            	<div>大&nbsp;分&nbsp;类&nbsp;&nbsp;：
					            		<html:select styleId="bigType" property="bigType" styleClass="fm" style="color:#fff;" onchange="getSmallType()">
											<html:option value="">请选择大分类</html:option>
											<c:forEach items="${requestScope.list}" var="data">
											<html:option value="${data.bigtypeId}">${data.bigtypeName}</html:option>
											</c:forEach>
										</html:select>
					            	</div>
					            	<div>小&nbsp;分&nbsp;类&nbsp;&nbsp;：
					            		 <html:select styleId="smallType" styleClass="fm" property="smallType" style="color:#fff;">
											<html:option value="">请选择小分类</html:option>
										</html:select>
					            	</div>
					            	<div>活动标题：
					            	<html:text property="title" styleId="title" styleClass="fm" style="color:#fff;"/>
					            	</div>
					            	<div>活动时间：
					                <html:text property="startTime" styleClass="fm1" styleId="startTime" style="color:#fff;"/>&nbsp;到&nbsp;
					                <html:text property="endTime" styleClass="fm1" styleId="endTime" style="color:#fff;"/>
					                </div>
					                <div>有效时间：
					                <html:text property="deadTime" styleClass="fm1" styleId="deadTime" style="color:#fff;"/>
					                </div>
					                <div>活动地址：
					                	<html:text property="address"  styleClass="fm" styleId="address" style="color:#fff;"/>
					                </div>
					                <div>联系方式：
					                	<html:text property="contact"  styleClass="fm" styleId="contact" style="color:#fff;"/>
					                </div>
									<div>活动介绍：
					            	  <dl>
					            	  <html:textarea property="content" styleId="content" styleClass="fm2" style="width:400px;height:100px;color:#fff;"/>
					            	  </dl>
									</div>
									<div>
					            	  <html:submit value="发布活动"/>
									</div>
					            </div>
					        </html:form>
						</div>
					</div>
					
				</div>
				
				<!-- 页面右侧内容 -->
				<div class="mainRight">
				
					<!-- 右侧栏目1 -->
					<div class="columnType1">
						<div class="columnType1Title">
							<div class="columnType1TitlePic">
								<img src="theme/skin1/public/columnPic/06.gif"/>
							</div>
							<div class="columnType1TitleText">
								<a href="">右侧窗体1</a>
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType1Content">
							<div id="rv"><a href="#">2323</a><br />
					            <div><a href="#"><img src="images/img04.gif" alt="img" /></a>活动积分<br />
					            最新活动</div>
					            </div>
					          </div>
						</div>
						<div class="columnType1End">
						</div>
					</div>
					
					
				</div>
			</div>
			
			<jsp:include flush="true" page="../activity/footer.jsp"></jsp:include>
				
		</div>
	</body>
</html>